Skip to content

factory/server: optional system_prompt for the agent (live runtime context)#4

Open
Bowenislandsong wants to merge 2 commits into
mainfrom
codex/ollama-model-preflight
Open

factory/server: optional system_prompt for the agent (live runtime context)#4
Bowenislandsong wants to merge 2 commits into
mainfrom
codex/ollama-model-preflight

Conversation

@Bowenislandsong

Copy link
Copy Markdown
Member

Threads an optional system_prompt through create_controllerAgentController(context_builder=ContextBuilder(...)) and AgentServerApp. Additive (+6 lines, factory.py + server.py); when unset, behavior is unchanged.

Why: the Agentica release pipeline pip installs AgenticLocal from this repos main, then passes a runtime preamble (live date/time/timezone, OS/arch, workspace) as the agent system prompt so the local model knows "now" and where it is running. Until this lands on main, CI-built releases lack the agentic-mode preamble (plain chat + planner already have it via agentica-core). Merging makes CI releases match the hand-built v0.1.2.

Bowenislandsong and others added 2 commits June 7, 2026 10:07
…ontext)

create_controller and AgentServerApp now accept system_prompt -> ContextBuilder,
so a host (Agentica) can give the agent a proper system prompt plus live context
(current date/time, OS) instead of the placeholder "small agent runtime
demonstration". Backward compatible (defaults preserve prior behavior).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ancel token

- UrllibWebClient.get_text now rejects non-public hosts (loopback/private/link-local/
  metadata) before any request -> closes the fetch_url/search_web SSRF pivot.
- AgentController.run / AgentSession.ask / AgentServerApp.chat take a cancel_event
  (threading.Event) checked at each step boundary + before each tool dispatch, so a
  voice barge-in actually stops the agent loop (no further model calls or tools).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant